package com.ymttest.database.mongo;

import java.util.ArrayList;
import java.util.Map;

import com.ymt.database.MongoDBDriver;

public class ProductCompareInfoModelWapper {
	MongoDBDriver mdd = YmtMongoDriverFactroy.getInstance_ProductSnapshotDBdriverNew("ProductCompareInfo");

	public ProductCompareInfoModelWapper()  {
	}
		

	@SuppressWarnings({ "rawtypes", "unchecked" })
	public Map<String,Object> getProductId(String productId) throws Exception {
		ArrayList<Map> list = mdd.selectPartLimitToMap("{\"ProductId\":\"" + productId + "\"}",1);
	    
	    return list.size()>0?list.get(0):null;
	}
	
	public static void main(String[] args) throws Exception {
		ProductCompareInfoModelWapper wapper = new ProductCompareInfoModelWapper();
		wapper.getProductId("");
	}
}
